/*
Author: Max E. K
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace OpenGado.DATA.Entities
{
	/// <summary>
	/// AuthorizationsId object for NHibernate mapped table 'authorizations'.
	/// </summary>
	[Serializable]
	public class AuthorizationsId
	{
		#region Member Variables
		protected int _authid;
		protected RequestHeader _requestheader;
		protected SystemUsers _systemusers;
		#endregion
		#region Constructors
			
		public AuthorizationsId() {}
					
		public AuthorizationsId(RequestHeader requestheader, SystemUsers systemusers) 
		{
			this._requestheader= requestheader;
			this._systemusers= systemusers;
		}

		#endregion
		#region Public Properties
		public  virtual int Authid
		{
			get { return _authid; }
			set {_authid= value; }
		}
		public  virtual RequestHeader RequestHeader
		{
			get { return _requestheader; }
			set {_requestheader= value; }
		}
		public  virtual SystemUsers SystemUsers
		{
			get { return _systemusers; }
			set {_systemusers= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			AuthorizationsId castObj = (AuthorizationsId)obj;
			return ( castObj != null ) &&
			this._authid == castObj.Authid &&
			this._requestheader.Equals( castObj.RequestHeader) &&
			this._systemusers.Equals( castObj.SystemUsers);
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _authid.GetHashCode();
			hash = 27 * hash * _requestheader.GetHashCode();
			hash = 27 * hash * _systemusers.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
